﻿"use strict";
define(["service/service", "service/httpService"], function (service) {
    service.factory("bazaarProductService", function ($location, httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/admin/bazaarProduct/gets", params);
            },
            get: function (params) {
                return httpService.get("/admin/bazaarProduct/get", params);
            },
            getCategory: function () {
                return httpService.get("/admin/bazaarProduct/getCategory");
            },
            down: function (id) {
                return httpService.post("/admin/bazaarProduct/down", { id: id });
            },
            recommend: function (id, isRecommend) {
                return httpService.post("/admin/bazaarProduct/recommend", { id: id, isRecommend: isRecommend });
            },
            audit: function (id, category_id, status, price, remark) {
                return httpService.post("/admin/bazaarProduct/audit", { id: id, categoryId: category_id, status, status, price, remark});
            }
        }
        return methods;
    });
});